package com.pisolution.scheduler.datasource.alert;

import com.pisolution.scheduler.datasource.instance.TaskInstance;
import com.pisolution.scheduler.datasource.instance.WorkflowInstance;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 用于发送或查询告警服务.
 *
 * @author sora
 * @version 0.1.0
 */
@Component
public class AlertService {
    /** 用于与告警信息进行交互. */
    @Resource
    private AlertMapper alertMapper;

    // -------------------------------------------------------------------------------------------------
    //  初始化
    // -------------------------------------------------------------------------------------------------

    public void init() {
    }

    // -------------------------------------------------------------------------------------------------
    //  告警处理
    // -------------------------------------------------------------------------------------------------

    public void sendTaskTimeoutAlert(final WorkflowInstance instance, final TaskInstance task) {
        // TODO: 完成此处逻辑.
    }
}
